*/
if ( (stack_ec->cs & 3) == 0 )
stack_ec->cs = FLAT_RING1_CS;
+ if ( (stack_ec->ss & 3) == 0 )
+ stack_ec->ss = FLAT_RING1_DS;
unlazy_fpu(prev_p);
#include <asm/uaccess.h>
#include <asm/domain_page.h>
-#if 0
+#if 1
#define MEM_LOG(_f, _a...) printk("DOM%d: (file=memory.c, line=%d) " _f "\n", current->domain, __LINE__, ## _a )
#else
#define MEM_LOG(_f, _a...) ((void)0)
for ( i = 0; i < 512; i++ )
if ( unlikely(!check_descriptor(ldt_page[i*2], ldt_page[i*2+1])) )
goto out;
-
if ( unlikely(page->flags & PG_need_flush) )
{
perfc_incrc(need_flush_tlb_flush);
if ( unlikely(ret) ) goto fail;
}
- out:
/* Make sure we unmap the right page! */
unmap_domain_mem(p_l1_entry-1);
return ret;
#define XLIDE_PARTN_SHIFT 6 /* amount to shift minor to get 'real' minor */
#define XLIDE_MAX_MINORS (1 << XLIDE_PARTN_SHIFT) /* minors per ide vbd */
-#define XLSCSI_PARTN_SHIFT 6 /* amount to shift minor to get 'real' minor */
+#define XLSCSI_PARTN_SHIFT 4 /* amount to shift minor to get 'real' minor */
#define XLSCSI_MAX_MINORS (1 << XLSCSI_PARTN_SHIFT) /* minors per scsi vbd */
#define XLVBD_PARTN_SHIFT 6 /* amount to shift minor to get 'real' minor */
hence using unit number for now but in old code was 'disk' aka
sequence number assigned by xen during probe = barfle? */
((xl_disk_t *)gd->real_devices)[minor>>gd->minor_shift].capacity =
- xdi->disks[i].capacity;
+ xdi->disks[i].capacity;
/* remember that we've done this major */
majors[major] = 1;
+ } else {
+ gd = get_gendisk(device);
}
if(XD_READONLY(xdi->disks[i].info))
pfn_to_mfn_frame_list[j++] =
virt_to_machine(&phys_to_machine_mapping[i]) >> PAGE_SHIFT;
+ /*
+ * NB. This is /not/ a full dev_close() as that loses route information!
+ * Instead we do essentialy the same as dev_close() but without notifying
+ * various registered subsystems about the NETDEV_DOWN event.
+ */
rtnl_lock();
for ( i = 0; i < 10; i++ )
{
sprintf(name, "eth%d", i);
- if ( (dev = __dev_get_by_name(name)) != NULL )
- dev_close(dev);
+ if ( ((dev = __dev_get_by_name(name)) != NULL) &&
+ (dev->flags & IFF_UP) )
+ {
+ dev_deactivate(dev);
+ clear_bit(__LINK_STATE_START, &dev->state);
+ if ( dev->stop != NULL )
+ dev->stop(dev);
+ dev->flags &= ~IFF_UP;
+ }
}
rtnl_unlock();
blkdev_resume();
+ /*
+ * We now do the opposite of the network suspend code. Basically it's
+ * dev_open() but without notifying anyone about NETDEV_UP.
+ */
rtnl_lock();
for ( i = 0; i < 10; i++ )
{
sprintf(name, "eth%d", i);
- if ( (dev = __dev_get_by_name(name)) != NULL )
- dev_open(dev);
+ if ( ((dev = __dev_get_by_name(name)) != NULL) &&
+ !(dev->flags & IFF_UP) )
+ {
+ set_bit(__LINK_STATE_START, &dev->state);
+ if ( (dev->open == NULL) || (dev->open(dev) == 0) )
+ {
+ dev->flags |= IFF_UP;
+ dev_activate(dev);
+ }
+ else
+ {
+ clear_bit(__LINK_STATE_START, &dev->state);
+ }
+ }
}
rtnl_unlock();